Index: usr.sbin/pppd/main.c
diff -u usr.sbin/pppd/main.c:1.19 src/usr.sbin/pppd/main.c:1.20
--- usr.sbin/pppd/main.c:1.19	Fri Aug 27 20:19:06 1999
+++ usr.sbin/pppd/main.c	Mon Jul 29 22:49:27 2002
@@ -833,7 +833,7 @@
     restore_tty(ttyfd);
 
     if (tty_mode != (mode_t) -1)
-	chmod(devnam, tty_mode);
+	fchmod(ttyfd, tty_mode);
 
     close(ttyfd);
     ttyfd = -1;
